﻿using System;
using System.Data;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using AnyOffice.Components;
using AnyOffice.DAL;
using log4net;
using System.Reflection;
using System.Data.SqlClient;
using Microsoft.ApplicationBlocks.Data;

namespace AnyOffice.general.info.post_no
{
    public partial class post_info : ModulePage
    {
        private static ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                string str = (Request.QueryString["province"] != null) ? Request.QueryString["province"].ToString() : "";
                this.litNavTitle.Text = str;
                string commandText = "SELECT * FROM Post_Tel WHERE Province=@Province";
                SqlParameter[] commandParameters = new SqlParameter[] { new SqlParameter("@Province", str) };
                DataTable table = SqlHelper.ExecuteDataset(base.Conn, CommandType.Text , commandText, commandParameters).Tables[0];
                this.rptPostNo.DataSource = table;
                this.rptPostNo.DataBind();
            }
            catch (Exception exception)
            {
                if (log.IsErrorEnabled)
                {
                    log.Error("", exception);
                }
            }
        }
 

    }
}
